<template>
  <div>
    <el-row :gutter="20">
        <el-col :span="6">
            <div class="div-header" style="background: greenyellow;">
                <span>信息统计</span>
            </div>
        </el-col>
        <el-col :span="6">
            <div class="div-header" style="background: lightblue;">
                <span>库存统计</span>
            </div>
        </el-col>
        <el-col :span="6">
            <div class="div-header" style="background: lightcoral;">
                <span>出纳统计</span>
            </div>
        </el-col>
    </el-row>
    <el-row :gutter="20">
        <component :is="view"/>
    </el-row>
  </div>
</template>

<script>
export default {
    data(){
        return {
            view: ""
        }
    },
    mounted(){
        this.InitView();
    },
    methods: {
        InitView(){
            let version = window.config.versionControl;
            if(version!=="" && version!== null && version!== undefined){
                this.view = resolve => require([`@/views/dynamic/components/ItemInfo_${version}.vue`],resolve);
            }else{
                this.view = resolve => require([`@/views/dynamic/components/ItemInfo.vue`],resolve);
            }
        }
    }
}
</script>

<style lang="scss" scoped>
.div-header{
    border-radius: 4px;
    height: 40px;
    line-height: 40px;
    text-align: center;
}
</style>